import request from '@/utils/request';

/**
 * 查询产品库管理列表
 *
 * @param {object} query
 */
export const listLibrary = (query?:any) => {
	return request({
		url: '/manage/library/list',
		method: 'get',
		params: query
	});
};

/**
 * 查询区域产品库管理列表
 *
 * @param {object} query
 */
export const qyListLibrary = (query?:any) => {
	return request({
		url: '/manage/library/regionlList',
		method: 'get',
		params: query
	});
};

/**
 * 查询产品库管理详细
 *
 * @param {string} id
 */
export const getLibrary = (id:string) => {
	return request({
		url: '/manage/library/' + id,
		method: 'get'
	});
};

/**
 * 新增产品库管理
 *
 * @param {object} data
 */
export const addLibrary = (data:any) => {
	return request({
		url: '/manage/library/add',
		method: 'post',
		data: data
	});
};

/**
 *  修改产品库管理
 *
 * @param {object} data
 */
export const updateLibrary = (data:any) => {
	return request({
		url: '/manage/library/edit',
		method: 'put',
		data: data
	});
};

/**
 * 删除产品库管理
 *
 * @param {string} id
 */
export const delLibrary = (id:string) => {
	return request({
		url: '/manage/library/' + id,
		method: 'delete'
	});
};


